home *** CD-ROM | disk | FTP | other *** search
- /*
- File: PCIRoutines.h
-
- Contains: This file contains items related to the PCI Bus.
-
- Written by:
-
- Copyright: © 1994 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
-
- To Do:
- */
-
-
- #include <Interrupts.h>
- #include <PCI.h>
- #include <OSUtils.h>
- #include <Kernel.h>
- #include <DriverServices.h>
- #include <Devices.h>
- #include <CodeFragments.h>
-
- //-----------------------------------------------------------------------------------------
- // These offsets are used by the GetPCICardBaseAddress() to obtain base addresses
- //-----------------------------------------------------------------------------------------
- #define kPCIConfigBase10Offset 0x10
- #define kPCIConfigBase14Offset 0x14
- #define kPCIConfigBase18Offset 0x18
- #define kPCIConfigBase1COffset 0x1C
- #define kPCIConfigBase20Offset 0x20
- #define kPCIConfigBase24Offset 0x24
- #define kPCIConfigBaseROM30Offset 0x30
-
-
-
- //-----------------------------------------------------------------------------------------
- // PCI Configuration Register Definitions
- // Register Bit Definitions also
- //-----------------------------------------------------------------------------------------
-
- #define kPCIConfigVendorIDRegister (LogicalAddress )0x00000000
- #define kPCIConfigDeviceIDRegister (LogicalAddress )0x00000002
- #define kPCIConfigCommandRegister (LogicalAddress )0x00000004
- #define kIOSpaceEnableBit 0x0001
- #define kMemorySpaceEnableBit 0x0002
- #define kBusMasterEnableBit 0x0004
- #define kPCIConfigStatusRegister (LogicalAddress )0x00000006
-
-
-
-
- //-----------------------------------------------------------------------------------------
- // Function Prototypes
- //-----------------------------------------------------------------------------------------
-
- extern OSStatus GetPCICardBaseAddress(RegEntryID *theID, UInt32 *baseRegAddress, UInt8 offsetValue,UInt32 *spaceAllocation);
- extern OSStatus UninstallISR(void);
- extern OSStatus InstallISR(void);
- extern OSStatus GetAProperty(RegEntryID *theID, RegPropertyName *prop,RegPropertyValue *val,RegPropertyValueSize *siz);
- extern void DisposeProperty(RegPropertyValue *val);
-
-
-